[HVM] Avoid accessing start_info from xenbus as far as possible, since
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Thu, 17 Aug 2006 15:22:08 +0000 (16:22 +0100)
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Thu, 17 Aug 2006 15:22:08 +0000 (16:22 +0100)
HVM domains do things slightly differently.
Signed-off-by: Steven Smith <ssmith@xensource.com>
linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c

index 3decb3d2bc91d65a88ad3c85931e6f118356d55c..2d42be1599825a3161e80600ed01304d68421090 100644 (file)
@@ -962,7 +962,7 @@ static int xsd_port_read(char *page, char **start, off_t off,
 
 static int __init xenbus_probe_init(void)
 {
-       int err = 0, dom0;
+       int err = 0;
        unsigned long page = 0;
 
        DPRINTK("");
@@ -977,9 +977,7 @@ static int __init xenbus_probe_init(void)
        /*
         * Domain0 doesn't have a store_evtchn or store_mfn yet.
         */
-       dom0 = (xen_start_info->store_evtchn == 0);
-
-       if (dom0) {
+       if (is_initial_xendomain()) {
                struct evtchn_alloc_unbound alloc_unbound;
 
                /* Allocate page. */
@@ -1037,7 +1035,7 @@ static int __init xenbus_probe_init(void)
        device_register(&xenbus_frontend.dev);
        device_register(&xenbus_backend.dev);
 
-       if (!dom0)
+       if (!is_initial_xendomain())
                xenbus_probe(NULL);
 
        return 0;